package com.xinxuchu.design.principle.dependenceinversion;

import com.xinxuchu.design.principle.dependenceinversion.Xincuchu;

/**
 * @program: java_learning
 * @description
 * @author: 辛旭初
 * @create: 2023-01-29 20:23
 **/
public class Test {

//    v1
//    public static void main(String[] args) {
//        Xincuchu xincuchu = new Xincuchu();
//        xincuchu.studyFECourse();
//        xincuchu.studyFECourse();
//    }

//    v2
//    public static void main(String[] args) {
//        Xincuchu xincuchu = new Xincuchu();
//        xincuchu.studyImoocCourse(new JavaCourse());
//        xincuchu.studyImoocCourse(new FECourse());
//    }

//    v3
//    public static void main(String[] args) {
//        Xincuchu xincuchu = new Xincuchu(new JavaCourse());
//        xincuchu.studyImoocCourse();
//    }

    public static void main(String[] args) {
        Xincuchu xincuchu = new Xincuchu();
        xincuchu.setiCourse(new JavaCourse());
        xincuchu.studyImoocCourse();

        xincuchu.setiCourse(new FECourse());
        xincuchu.studyImoocCourse();
    }
}
